from django.db import models
# 定义post
class post(models.Model):
    title=models.CharField(max_length=200)
    content=models.TextField()
    author=models.ForeignKey('auth.User',on_delete=models.CASCADE)
    published=models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.title

